package com.ler.yrmall.product.controller;

import com.ler.yrmall.product.service.SpuDetailService;
import com.ler.yrmall.basic.Result;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * spu
 * @author Leron
 */
@RestController
@RequestMapping("/spu-detail")
public class SpuDetailController {

    @Resource
    private SpuDetailService spuDetailService;


    @RequestMapping("/list/{spuId}")
    public Result<?> list(@PathVariable Long spuId) {
        return Result.ok((spuDetailService.getDescBySpuId(spuId)));
    }


}
